package com.deer.wms.base.system.service.impl;

import com.deer.wms.base.system.dao.BillInRecordMapper;
import com.deer.wms.base.system.model.BillInRecord;
import com.deer.wms.base.system.model.BillInRecordCriteria;
import com.deer.wms.base.system.model.BillInRecordDto;
import com.deer.wms.base.system.model.bill.BillInDetailStreamVo;
import com.deer.wms.base.system.service.BillInRecordService;


import com.deer.wms.common.core.service.AbstractService;
import com.deer.wms.common.core.text.Convert;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by  on 2019/10/18.
 */
@Service
@Transactional
public class BillInRecordServiceImpl extends AbstractService<BillInRecord, Integer> implements BillInRecordService {

    @Autowired
    private BillInRecordMapper billInRecordMapper;

    @Override
    public List<BillInRecordDto> findListToEBS(BillInRecordCriteria billInRecordCriteria){
        return billInRecordMapper.findListToEBS(billInRecordCriteria);
    }

    @Override
    public List<BillInRecordDto> findCheckRecordFromEBS(BillInRecordCriteria billInRecordCriteria){
        return billInRecordMapper.findCheckRecordFromEBS(billInRecordCriteria);
    }

    @Override
    public List<BillInRecordDto> findList(BillInRecordCriteria billInRecordCriteria){
        return billInRecordMapper.findList(billInRecordCriteria);
    }

    @Override
    public List<BillInRecordDto> findListbyid(BillInRecordCriteria billInRecordCriteria) {
        return billInRecordMapper.findListbyid(billInRecordCriteria);
    }

    @Override
    public List<BillInRecordDto> findExportList(BillInRecordCriteria billInRecordCriteria) {
        return billInRecordMapper.findExportList(billInRecordCriteria);
    }

    @Override
    public BillInRecord findInRecordById(Integer id) {
        return billInRecordMapper.findBillInRecordById(id);
       
    }

    @Override
    public int updateBillInRecord(BillInRecord billInRecord) {
        return billInRecordMapper.updateBillInRecord(billInRecord);
    }

    @Override
    public int insertBillInRecord(BillInRecord billInRecord) {
        return billInRecordMapper.insertBillInRecord(billInRecord);
    }

    /**
     * 删除入库记录
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteBillInRecordByIds(String ids)
    {
        return billInRecordMapper.deleteBillInRecordByIds(Convert.toStrArray(ids));
    }

    @Override
    public BillInRecord verifyBillInRecord(BillInRecord billInRecord) {
        return billInRecordMapper.verifyBillInRecord(billInRecord);
    }

    @Override
    public List<BillInDetailStreamVo> findStreamList(BillInDetailStreamVo billInDetailStreamVo) {
        return billInRecordMapper.findStreamList(billInDetailStreamVo);
    }

}
